package untils

import "user_srv/pkg"

type SendSms interface {
	SendSms(mobile string, code string) error
}
type Sms struct {
}

func (s *Sms) SendSms(mobile string, code string) error {
	sms, err := pkg.SendSms(mobile, code)
	if err != nil {
		return err
	}
	if *sms.Body.Code != "OK" {
		return err
	}
	return nil
}
